// 导入模块
var mysql = require("mysql")


// 创建连接对象
var connection = mysql.createConnection({
	user:"root",
	password:"123456",
	database:"lzwl"
})

// 执行SQL语句
connection.query("select * from t_video",function(errors,results,fields) {
	if(errors) {
		console.log(errors)
	} else {
		console.log(results);
		console.log(fields)
	}
})

// 关闭连接
connection.end()